package com.cdh.edu.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cdh.edu.entity.Course;
import com.cdh.edu.entity.vo.*;

import java.util.List;

/**
 * @author cdh
 * @since 2020-10-20
 */
public interface CourseService extends IService<Course> {
    //添加课程信息
    String saveCourseInfo(CourseInfoVo courseInfoVo);

    // 根据课程ID查询课程基本信息
    CourseInfoVo getCourseInfo(String courseId);

    //修改课程信息
    void updateCourseInfo(CourseInfoVo courseInfoVo);

    //根据课程id查询课程确认信息
    CoursePublishVo getPublishCourseInfoByCourseId(String courseId);

    //删除课程
    boolean deleteCourseById(String courseId);

    //课程分页列表展示
    IPage<CourseVo> selectPage(long current, long limit, CourseQueryVo cq);

    boolean removeCoverById(String id);

    //前端课程列表查询
    List<Course> webSelectList(WebCourseQueryVo webCourseQueryVo);

    /**
     * 获取课程信息并更新浏览量
     * @param id
     * @return
     */
    WebCourseVo selectWebCourseVoById(String id);

    /**
     * 查询热门课程
     * @return
     */
    List<Course> selectHotCourse();
}
